from django.conf.urls import url
from book.views import index, paramsA, paramsB, paramsC, paramsD, paramsE, response, responseRedirect, setCookie, \
    getCookie, setSession, getSession, CenterView, tenpletaIndex
from book.views import RegisterView

urlpatterns = [
    url(r'^index/$', index, name="index"),

    # url(r'^book/(1)/(11)/$', home, name="home"),
    # 位置参数
    url(r'^paramsA/(\d+)/(\d+)/$', paramsA, name="paramsA"),
    # 关键字参数
    url(r'^paramsB/(?P<cateid>\d+)/(?P<bookid>\d+)/$', paramsB, name="home"),
    # QueryDict对象
    url(r'^paramsC/$', paramsC, name="home"),
    url(r'^paramsD/$', paramsD, name="home"),
    url(r'^paramsE/$', paramsE, name="home"),
    url(r'^response/$', response, name="home"),
    url(r'^responseRedirect/$', responseRedirect, name="home"),
    url(r'^setCookie/$', setCookie, name="setCookie"),
    url(r'^getCookie/$', getCookie, name="getCookie"),
    url(r'^setSession/$', setSession, name="setSession"),
    url(r'^getSession/$', getSession, name="setSession"),
    url(r'^RegisterView/$', RegisterView.as_view(), name="RegisterView"),
    url(r'^CenterView/$', CenterView.as_view(), name="CenterView"),
    url(r'^tenpletaIndex/$', tenpletaIndex.as_view(), name="tenpletaIndex"),
    # url(r'', index, name="index2"),
]
